<template>
  <el-tabs class="classify-tabs" :tab-position="tabPosition" type="border-card">
    <el-tab-pane v-for="(item,index) in listData" :key="index" :label="item.evalTypeName">
      <test-classify :list="item.evalItemVOList" ref="testClassify" />
    </el-tab-pane>
  </el-tabs>
</template>

<script>
import TestClassify from './TestClassify'
export default {
  components: {
    TestClassify
  },
  data() {
    return {
      tabPosition: 'left',
      listData: []
    }
  },
  methods: {
    getData(arr) {
      console.log('getData arr', arr)

      this.listData = arr
      let all = []
      this.listData.map(v => {
        all = [...all, ...v.evalItemVOList]
      })
      this.listData.unshift({
        evalTypeName: '考评分类',
        evalItemVOList: all
      })
    }
  }
}
</script>

<style scoped>
.classify-tabs >>> .el-tabs__header {
  margin-right: 0;
}
.classify-tabs >>> .el-tabs__content {
  padding: 0;
}
</style>
